﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Blog.Models.Entities;
using MvcEngine.Core.Validation;

namespace MvcEngine.Blog.Models.Entities
{
    public class BlogPost
    {
        public Guid Id { get; set; }

        public Guid BlogId { get; set; }

        [LengthValidator("PostTitleLengthValidator", 256)]
        [RequiredFieldValidator("PostTitleRequiredValidator")]
        public string Title { get; set; }

        public string Description { get; set; }

        public string Keywords { get; set; }

        [RequiredFieldValidator("PostContentRequiredValidator")]
        public string PostContent { get; set; }

        [RequiredFieldValidator("PostAuthorRequiredValidator")]
        [LengthValidator("PostAuthorLengthValidator", 50)]
        public string Author { get; set; }

        public bool IsCommentEnabled { get; set; }

        public bool Rating { get; set; }

        [LengthValidator("PostSlugLengthValidator", 256)]
        public string Slug { get; set; }

        public DateTime? PublishedDate { get; set; }

        public DateTime CreatedDate { get; set; }

        public DateTime ModifiedDate { get; set; }

    }
}
